<extend name="Public:layout"/>
<block name="content">
    <div class="panel admin-panel">
        <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>编辑菜单</strong></div>
        <div class="body-content">
            <div class="container">
                <form method="post" class="form-x ajax-submit" action="{:U('setting')}">
                    <input type="hidden" name="menu_id" value="{$menu.menu_id}">
                    <div class="row row-border form-group">
                        <div class="col-lg-2 col-md-2">菜单名称</div>
                        <div class="col-lg-4 col-md-4">{$menu.menu_name}</div>
                        <div class="col-lg-2 col-md-2">菜单描述</div>
                        <div class="col-lg-4 col-md-4">{$menu.remark}</div>
                    </div>
                    <div class="row row-border form-group">
                        <table class="table table-hover table-bordered permission">
                            <thead>
                                <tr class="bg-blue">
                                    <td>权限名称</td>
                                    <td>所属模块</td>
                                    <td>所属控制器</td>
                                    <td>操作名称</td>
                                    <td>备注</td>
                                    <td>操作</td>
                                </tr>
                            </thead>
                            <tbody>
                                <foreach name="list" item="vo">
                                    <tr>
                                        <td><input type="text" name="auth_name[]" value="{$vo.auth_name}"></td>
                                        <td><input type="text" name="module_name[]" value="{$vo.module_name}"></td>
                                        <td><input type="text" name="controller_name[]" value="{$vo.controller_name}"></td>
                                        <td><input type="text" name="action_name[]" value="{$vo.action_name}"></td>
                                        <td><input type="text" name="remark[]" value="{$vo.remark}"></td>
                                        <td><span class="icon-trash"></span></td>
                                    </tr>
                                </foreach>
                            </tbody>
                            <tfoot>
                                <tr class="hide">
                                    <td><input type="text" name="auth_name[]"></td>
                                    <td><input type="text" name="module_name[]"></td>
                                    <td><input type="text" name="controller_name[]"></td>
                                    <td><input type="text" name="action_name[]"></td>
                                    <td><input type="text" name="remark[]"></td>
                                    <td><span class="icon-trash"></span></td>
                                </tr>
                                <tr>
                                    <td colspan="20"><span class="btn btn-info icon-plus add-permission">添加权限</span></td>
                                </tr>
                            </tfoot>
                        </table>
                    </div>

                    <div class="row row-border form-group">
                        <div class="label">
                            <label></label>
                        </div>
                        <div class="field">
                            <button class="btn btn-info bg-main icon-save" type="submit"> 保存</button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
</block>